package com.twu.biblioteca.entity;

/**
 * Created by ccsong on 9/16/14.
 */
public class Book {
    private  String name;
    private String author;
    private int publishYear;
    public Book(){
        name = null;
        author = null;
        publishYear = 0000;
    }
    public Book(String name,String author,int publishYear){
        this.name = name;
        this.author = author;
        this.publishYear = publishYear;
    }
    public String toString(){
        return name + " :\n"+"\tauthor "+author+", \tpubish year "+publishYear+"\n";
    }

    public boolean isMatch(String name){
        return this.name.equals(name)?true:false;
    }

    public String getName() {
        return name;
    }
}
